package com.jiamingZhao;


import com.jiamingZhao.mapper.RoleMapper;
import com.jiamingZhao.mapper.TenantMapper;
import com.jiamingZhao.mapper.factory.MapperProxyFactory;
import com.jiamingZhao.pojo.entity.Role;
import com.jiamingZhao.pojo.entity.Tenant;
import com.jiamingZhao.wrapper.Wrappers;

import java.util.List;

public class ApplicationStart {
    public static void main( String[] args ) {
        TenantMapper tenantMapper = MapperProxyFactory.getMapper(TenantMapper.class);
        List<Tenant> list = tenantMapper.list(Wrappers.lambdaQuery(Tenant.class).limit(2));
        System.out.println(list);
        Tenant tenant = tenantMapper.getById(123598820738675201L);
        System.out.println(tenant);
        List<Tenant> zjmTenant = tenantMapper.list(Wrappers.lambdaQuery(Tenant.class).like(Tenant::getTenantName, "佳明"));
        System.out.println(zjmTenant);
        RoleMapper roleMapper = MapperProxyFactory.getMapper(RoleMapper.class);
        List<Role> roles = roleMapper.list(Wrappers.lambdaQuery(Role.class).limit(10));
        System.err.println(roles);
    }

}

